﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head runat="server">
    <title>浙江遥测管理系统——登录</title>
    <link href="Css/login.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
    function refreshimg() {
      
        var img = document.getElementById("checkimag");
        img.src = 'ValidateCode.aspx?id=' + Math.random();
        img.style.display = "";
    }
    var $=function (id){return document.getElementById(id)}
    
    function frmChk()
    {
        if($("txtUserName").value=="")
        {
            $("txtUserName").focus();
            return false;
        }
        else if($("txtPassword").value=="")
        {
            $("txtPassword").focus();
            return false;
        }
        else if($("txtChkCode").value=="")
        {
            $("txtChkCode").focus();
            return false;
        }
    }
    
    function frmReset()
    {
        $("txtUserName").value=""
        $("txtPassword").value=""
        $("txtChkCode").value=""
        return false;
    }
    </script>
<style type="text/css">
.logintb input{vertical-align:middle;padding-right:4px;}
.logintb td{text-align:left;}
.logintb th{font-weight:100;text-align:right;}
</style>
</head>
<body style="background-image: url(Css/img/t3.jpg); background-repeat: repeat-x;">
    <form id="form1" runat="server">
    <div style="margin-top: 150px" align="center">
        <div class="div1">
            <div class="div2">
                <img src="Css/img/t1.jpg" width="569" height="95" /></div>
            <div class="div3">
                <table width="400" border="0" cellspacing="0" cellpadding="0" class="logintb">
                    <tr>
                        <th width="30%" style="font-size: 12px;">
                            用户名：
                        </th>
                        <td width="70%" align=left>
                            <asp:TextBox ID="txtUserName" runat="server" Width="220" style="font-size: 14px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th style="font-size: 12px">
                            密 码：
                        </th>
                        <td align=left>
                            <asp:TextBox ID="txtPassword" Width="220" runat="server" style="font-size: 14px" TextMode="Password"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th style="font-size: 12px">
                            验证码：
                        </th>
                        <td align=left>
                            <asp:TextBox ID="txtChkCode" Width="160" style="font-size: 14px" runat="server" onfocus="refreshimg();"></asp:TextBox>
                            <asp:Image Width="54px" Height="20px" runat="server" ID="checkimag" onclick="refreshimg();"
                                Style="" src="ValidateCode.aspx?id=' + Math.random()" title="点击重新获取验证码！" alt="点击重新获取验证码" />
                        </td>
                    </tr>
                    <tr>
                       <td></td>
                       <td>
                        <input  type="checkbox" name="chkRemPwd" id="chkRemPwd" value="checkbox" runat="server" /><label for="chkRemPwd">记住密码</label>
                        <input type="checkbox" name="chkAutoLogin" id="chkAutoLogin" value="checkbox" runat="server" /><label for="chkAutoLogin">自动登录</label>
                       </td>
                    </tr>
                    
                    <tr>
                        <td colspan="2" align="center" style="text-align:center;">
                            <asp:ImageButton ID="ImageButton1" runat="server" OnClick="btnLogin_Click" OnClientClick="return frmChk();"
                                Width="111" Height="34" ImageUrl="Css/img/login.jpg" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="ImageButton2" runat="server" OnClientClick="return frmReset();return false;"
                                Width="111" Height="34" ImageUrl="Css/img/cann.jpg" />
                        </td>
                    </tr>
                    <tr><td colspan=2 style="font-weight:100;text-align:center;">技术支持：浙江省水文局 通信科     联系电话：0571-87825310 </td></tr>
                </table>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
